package com.liangzhong.modules.explore.commamd
{
	import com.liangzhong.proxy.explore.ExploreProxy;
	import com.liangzhong.proxyconstant.explore.ExploreProxyConstant;
	
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	public class ExploreCommand extends SimpleCommand
	{
		public function ExploreCommand()
		{
			super();
		}
		override public function execute(notification:INotification):void
		{
			switch(notification.getName())
			{
				case ExploreProxyConstant.EXPLORE_MEDIATORTOCOMMAND:
					mediatorNotification(notification);
					break;
			}
			
		}
		/**
		 * Mediator -->Command 通知
		 * @param notification
		 * 
		 */		
		private function mediatorNotification(notification:INotification):void
		{
			var proxy:ExploreProxy = facade.retrieveProxy(ExploreProxy.PROXYNAME) as ExploreProxy;
			switch(notification.getType())
			{
				case ExploreProxyConstant.ADD_FEEL://增加好感度
					proxy.requestAddFeel(notification.getBody());
					break;
				case ExploreProxyConstant.UP_EXPLORE://升级
					proxy.requestCourtUp();
					break;
				case ExploreProxyConstant.BUY_EXPLORE_TIME://购买探索次数
					proxy.requestBuyExploreTime(notification.getBody());
					break;
				case ExploreProxyConstant.SIGN://签约
					proxy.requestSign(notification.getBody());
					break;
				case ExploreProxyConstant.CLEAR_TIME://清除冷却时间
					proxy.requestClearUpTime(notification.getBody());
					break;
				case ExploreProxyConstant.EXPLORE_INFO://探索信息
					proxy.requestExploreInfo();
					break;
				case ExploreProxyConstant.EXPLORE_PLAYER:
					proxy.requestExplorePlayer(notification.getBody());
					break;
			}
		}
	}
}